package com.lc.afbx.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/6/7.
 */
@HttpInlet(Conn.INLET_API_COMMISSION_INDEX)
public class GetApiShowYongJin extends BaseAsyGet<GetApiShowYongJin.Info> {
    public String userid;
    public GetApiShowYongJin(AsyCallBack<GetApiShowYongJin.Info> asyCallBack) {
        super(asyCallBack);
    }

    protected Info parser(JSONObject jsonObject) {

        TOAST = jsonObject.optString("message");
        if (jsonObject.optInt("code") == 200) {

            Info info = new Info();
            Data d = new Data();
            JSONObject o = jsonObject.optJSONObject("data");

            d.extract = o.optString("extract");
            d.extracted = o.optString("extracted");

            info.data = d;

            return info;
        }
        return null;
    }

    public static class Info {
        public String code, message;
        public Data data;
    }

    public static class Data {
//        "extract": "0.00",
//                "extracted": "200.00"
        public String extract, extracted;
    }
}
